package com.biz.primus.ms.member.streamListener;

import com.biz.primus.base.constant.MemberStreamConstant;
import com.biz.primus.model.member.enums.AddressTypes;
import com.biz.primus.ms.base.service.AbstractBaseService;
import com.biz.primus.ms.member.dao.po.MemberAddressLabel;
import com.biz.primus.ms.member.dao.redis.MemberAddressLabelRedisDao;
import com.biz.primus.ms.member.dao.repository.MemberAddressLabelRepository;
import com.biz.primus.ms.member.dao.ro.MemberAddressLabelRo;
import com.biz.primus.ms.member.dao.ro.MemberRo;
import com.biz.primus.ms.member.service.MemberLabelService;
import com.biz.primus.ms.member.service.MemberService;
import com.biz.primus.ms.member.trans.MemberAddressLabelToMemberAddressLabelRo;
import com.google.common.collect.Lists;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by liangbin on 2017/11/25.
 */
@Service
public class MemberListener extends AbstractBaseService {

    @Autowired
    private  MemberAddressLabelRedisDao memberAddressLabelRedisDao;
    @Autowired
    private  MemberAddressLabelRepository memberAddressLabelRepository;
    @Autowired
    private MemberService memberService;

    @Autowired
    private MemberLabelService memberLabelService;



    /**
     * 监听登录响应事件
     */
//    @StreamListener(MemberStreamConstant.MEMBER_RESP)
    @Transactional
    public void loginResponse(Long memberId){
        MemberRo ro = memberService.findRoById(memberId);


    }
}
